#import "dfhgwhruebvhrheyavenuetyre.h"
#import "dfhgwhruebvhrheyoutwarddelegate.h"
#import "dfhgwhruebvhrheyluggagerecorder.h"
@implementation dhgfywegwygeydwsegmentexistence
- (instancetype)init {
	if ([super init]) {
		[self configure];
	}
	return self;
}
- (void)configure {
	self.apply_now_time = -999;
	self.basic_confirm_time = -999;
	self.basic_confirm_duration = -999;
	self.purpose_last_duration = -999;
	self.purpose_updatecount = -999;
	self.purpose_all_duration = @"-999";
	self.email_duration = -999;
	self.emai_updatecount = -999;
	self.facebook_name_duration = -999;
	self.facebook_name_updatecount = -999;
	self.messenger_viber_duration = -999;
	self.messenger_viber_updatecount = -999;
	self.backup_phone_duration = -999;
	self.backup_phone_updatecount = -999;
	self.Industry_category_duration = -999;
	self.Industry_category_updatecount = -999;
	self.Industry_category_add_type = -999;
	self.religion_duration = -999;
	self.religion_updatecount = -999;
	self.marry_status_duration = -999;
	self.marry_status_updatecount = -999;
	self.kids_num_duration = -999;
	self.kids_num_update_count = -999;
	self.education_duration = -999;
	self.education_updatecount = -999;
	self.address_completed_duration = -999;
	self.residence_duration = -999;
	self.residence_updatecount = -999;
	self.detail_address_duration = -999;
	self.detail_address_updatetime = -999;
	self.job_information_duration = -999;
	self.job_information_updatecount = -999;
	self.company_name_duration = -999;
	self.company_name_updatecount = -999;
	self.working_Experienct_duration = -999;
	self.working_Experienct_updatecount = -999;
	self.payday_first_duration = -999;
	self.payday_first_updatecount = -999;
	self.payday_second_duration = -999;
	self.payday_second_updatecount = -999;
	self.month_income_duration = -999;
	self.month_income_updatecount = -999;
	self.company_address_duration = -999;
	self.company_address_updatecount = -999;
	self.company_detail_address_duration = -999;
	self.company_detail_address_updatecount = -999;
	self.emergency_contact_click_time = -999;
	self.emergency_contact_format_errorcount = -999;
	self.emergency_contact_duplicate_errorcount = -999;
	self.emergency_contact_complleted_duration = -999;
	self.emergency_contact_one_duration = -999;
	self.emergency_fill_name_one_updatecount = -999;
	self.emergency_contact_one_phone_duration = -999;
	self.emergency_fill_one_phone_updatecount = -999;
	self.emergency_contact_one_relation_duration = -999;
	self.emergency_contact_one_relation_updatecount = -999;
	self.emergency_contact_two_duration = -999;
	self.emergency_fill_name_two_updatecount = -999;
	self.emergency_contact_two_phone_duration = -999;
	self.emergency_fill_two_phone_updatecount = -999;
	self.emergency_contact_two_relation_duration = -999;
	self.emergency_contact_two_relation_updatecount = -999;
	self.emergency_contact_three_duration = -999;
	self.emergency_fill_name_three_updatecount = -999;
	self.emergency_contact_three_phone_duration = -999;
	self.emergency_contact_three_relation_duration = -999;
	self.emergency_contact_three_relation_updatecount = -999;
	self.emergency_contact_four_duration = -999;
	self.emergency_fill_name_four_updatecount = -999;
	self.emergency_contact_four_phone_duration = -999;
	self.emergency_fill_four_phone_updatecount = -999;
	self.emergency_contact_four_relation_duration = -999;
	self.emergency_contact_four_relation_updatecount = -999;
	self.emergency_contact_five_duration = -999;
	self.emergency_fill_name_five_updatecount = -999;
	self.emergency_contact_five_phone_duration = -999;
	self.emergency_fill_five_phone_updatecount = -999;
	self.emergency_contact_five_relation_duration = -999;
	self.emergency_contact_five_relation_updatecount = -999;
	self.backend_num = -999;
}
@end
@implementation dhgfywegwygeydwexistenceconquest
- (instancetype)init {
	if ([super init]) {
		[self configure];
	}
	return self;
}
- (void)configure {
	self.idcard_click_time = -999;
	self.idcard_type_duration = -999;
	self.idcard_type_updatecount = -999;
	self.idcard_photo_document_duration = -999;
	self.idcard_photo_document_updatecount = -999;
	self.idcard_size = -999;
	self.idcard_cps_size = -999;
	self.face_photo_document_duration = -999;
	self.face_photo_document_requestcount = -999;
	self.face_photo_document_errorcount = -999;
	self.face_size = -999;
	self.idcard_number_duration = -999;
	self.idcard_number_updatecount = -999;
	self.idcard_is_echo = -999;
	self.idcard_echocount = -999;
	self.name_one_duration = -999;
	self.name_one_updatecount = -999;
	self.name_two_duration = -999;
	self.name_two_updatecount = -999;
	self.name_three_duration = -999;
	self.name_three_updatecount = -999;
	self.gender_updatecount = -999;
	self.birthday_duration = -999;
	self.birthday_updatecounter = -999;
	self.backend_num_id = -999;
	self.idcard_submit_time = -999;
	self.page_duration = -999;
}
@end
@implementation dhgfywegwygeydwconquestcharacteristic
- (instancetype)init {
	if ([super init]) {
		[self configure];
	}
	return self;
}
- (void)configure {
	self.upload_attachment = -999;
	self.employee_card_payslip_duration = -999;
	self.employee_card_payslip_updatecount = -999;
	self.other_work_photo_duration = -999;
	self.other_work_photo_updatecount = -999;
	self.business_permit_duration = -999;
	self.business_permit_updatecount = -999;
	self.other_business_duration = -999;
	self.other_business_updatecount = -999;
	self.repayment_vouchers_duraion = -999;
	self.repayment_vouchers_updatecount = -999;
	self.add_more_duration = -999;
	self.add_more_updatecount = -999;
	self.next_time = -999;
	self.page_duration_option = -999;
}
@end
@implementation dfhgwhruebvhrheyavenuetyre
+ (NSString *)getTrackDataByType:(int)type {
	NSString *key = type == 1 ? dhgfywegwygeydwcharacteristicpredominant : type == 2 ? dhgfywegwygeydwpredominantcrash : dhgfywegwygeydwcrashbarrier;
	return [dfhgwhruebvhrheyoptionsaving getDataStringByKey:key];
}
+ (void)defaultTracking:(NSString *)name byType:(int)type {
	if (![dfhgwhruebvhrheyoptionsaving isLogin]) {
		return;
	}
	NSString *dataString = [self getTrackDataByType:type];
	if (dataString.length == 0) {
		return;
	}
	switch (type) {
		case 1:{
			dhgfywegwygeydwsegmentexistence *model = [dhgfywegwygeydwsegmentexistence yy_modelWithJSON:dataString];
			NSMutableDictionary *basic = [model yy_modelToJSONObject];
			basic[name] = @(-999);
			[dfhgwhruebvhrheyoptionsaving saveDataString:[basic yy_modelToJSONString] withKey:dhgfywegwygeydwcharacteristicpredominant];
		}
			break;
		case 2: {
			dhgfywegwygeydwexistenceconquest *model = [dhgfywegwygeydwexistenceconquest yy_modelWithJSON:dataString];
			NSMutableDictionary *identity = [model yy_modelToJSONObject];
			identity[name] = @(-999);
			[dfhgwhruebvhrheyoptionsaving saveDataString:[identity yy_modelToJSONString] withKey:dhgfywegwygeydwpredominantcrash];
		}
			break;
		case 3: {
			dhgfywegwygeydwconquestcharacteristic *model = [dhgfywegwygeydwconquestcharacteristic yy_modelWithJSON:dataString];
			NSMutableDictionary *option = [model yy_modelToJSONObject];
			option[name] = @(-999);
			[dfhgwhruebvhrheyoptionsaving saveDataString:[option yy_modelToJSONString] withKey:dhgfywegwygeydwcrashbarrier];
		}
			break;
		default:
			break;
	}
}
+ (void)updateCount:(NSString *)name byType:(int)type {
	if (![dfhgwhruebvhrheyoptionsaving isLogin]) {
		return;
	}
	NSString *dataString = [self getTrackDataByType:type];
	switch (type) {
		case 1:{
			dhgfywegwygeydwsegmentexistence *model;
			if (dataString.length == 0) {
				model = [[dhgfywegwygeydwsegmentexistence alloc] init];
			}else {
				model = [dhgfywegwygeydwsegmentexistence yy_modelWithJSON:dataString];
			}
			NSMutableDictionary *basic = [model yy_modelToJSONObject];
			int value = [basic[name] intValue];
			if (value == - 999) {
				value = 1;
			}else {
				value += 1;
			}
			basic[name] = @(value);
			[dfhgwhruebvhrheyoptionsaving saveDataString:[basic yy_modelToJSONString] withKey:dhgfywegwygeydwcharacteristicpredominant];
		}
			break;
		case 2: {
			dhgfywegwygeydwexistenceconquest *model;
			if (dataString.length == 0) {
				model = [[dhgfywegwygeydwexistenceconquest alloc] init];
			}else {
				model = [dhgfywegwygeydwexistenceconquest yy_modelWithJSON:dataString];
			}
			NSMutableDictionary *identity = [model yy_modelToJSONObject];
			int value = [identity[name] intValue];
			if (value == - 999) {
				value = 1;
			}else {
				value += 1;
			}
			identity[name] = @(value);
			[dfhgwhruebvhrheyoptionsaving saveDataString:[identity yy_modelToJSONString] withKey:dhgfywegwygeydwpredominantcrash];
		}
			break;
		case 3: {
			dhgfywegwygeydwconquestcharacteristic *model;
			if (dataString.length == 0) {
				model = [[dhgfywegwygeydwconquestcharacteristic alloc] init];
			}else {
				model = [dhgfywegwygeydwconquestcharacteristic yy_modelWithJSON:dataString];
			}
			NSMutableDictionary *option = [model yy_modelToJSONObject];
			int value = [option[name] intValue];
			if (value == - 999) {
				value = 1;
			}else {
				value += 1;
			}
			option[name] = @(value);
			[dfhgwhruebvhrheyoptionsaving saveDataString:[option yy_modelToJSONString] withKey:dhgfywegwygeydwcrashbarrier];
		}
			break;
		default:
			break;
	}
}
+ (void)addTracking:(NSString *)name withValue:(int)value byType:(int)type {
	if (![dfhgwhruebvhrheyoptionsaving isLogin]) {
		return;
	}
	NSString *dataString = [self getTrackDataByType:type];
	switch (type) {
		case 1:{
			dhgfywegwygeydwsegmentexistence *model;
			if (dataString.length == 0) {
				model = [[dhgfywegwygeydwsegmentexistence alloc] init];
			}else {
				model = [dhgfywegwygeydwsegmentexistence yy_modelWithJSON:dataString];
			}
			NSMutableDictionary *basic = [model yy_modelToJSONObject];
			if (value == 0) {
				long long current = [[NSDate date] timeIntervalSince1970] * 1000;
				basic[name] = @(current);
			}else {
				basic[name] = @(value);
			}
			[dfhgwhruebvhrheyoptionsaving saveDataString:[basic yy_modelToJSONString] withKey:dhgfywegwygeydwcharacteristicpredominant];
		}
			break;
		case 2: {
			dhgfywegwygeydwexistenceconquest *model;
			if (dataString.length == 0) {
				model = [[dhgfywegwygeydwexistenceconquest alloc] init];
			}else {
				model = [dhgfywegwygeydwexistenceconquest yy_modelWithJSON:dataString];
			}
			NSMutableDictionary *identity = [model yy_modelToJSONObject];
			if (value == 0) {
				long long current = [[NSDate date] timeIntervalSince1970] * 1000;
				identity[name] = @(current);
			}else {
				identity[name] = @(value);
			}
			[dfhgwhruebvhrheyoptionsaving saveDataString:[identity yy_modelToJSONString] withKey:dhgfywegwygeydwpredominantcrash];
		}
			break;
		case 3: {
			dhgfywegwygeydwconquestcharacteristic *model;
			if (dataString.length == 0) {
				model = [[dhgfywegwygeydwconquestcharacteristic alloc] init];
			}else {
				model = [dhgfywegwygeydwconquestcharacteristic yy_modelWithJSON:dataString];
			}
			NSMutableDictionary *option = [model yy_modelToJSONObject];
			if (value == 0) {
				long long current = [[NSDate date] timeIntervalSince1970] * 1000;
				option[name] = @(current);
			}else {
				option[name] = @(value);
			}
			[dfhgwhruebvhrheyoptionsaving saveDataString:[option yy_modelToJSONString] withKey:dhgfywegwygeydwcrashbarrier];
		}
			break;
		default:
			break;
	}
}
+ (void)addTotalTracking:(NSString *)name byType:(int)type {
	if (![dfhgwhruebvhrheyoptionsaving isLogin]) {
		return;
	}
	NSString *dataString = [self getTrackDataByType:type];
	switch (type) {
		case 1:{
			dhgfywegwygeydwsegmentexistence *model;
			if (dataString.length == 0) {
				model = [[dhgfywegwygeydwsegmentexistence alloc] init];
			}else {
				model = [dhgfywegwygeydwsegmentexistence yy_modelWithJSON:dataString];
			}
			long long current = [[NSDate date] timeIntervalSince1970] * 1000;
			NSMutableDictionary *basic = [model yy_modelToJSONObject];
			NSString *valueString = [NSString stringWithFormat:@"%@", basic[name]];
			NSRange r = [valueString rangeOfString:@"_"];
			if (r.location == NSNotFound) {
				valueString = [NSString stringWithFormat:@"%lld_%d", current, 0];
			}else {
				valueString = [valueString stringByReplacingCharactersInRange:NSMakeRange(0, r.location) withString:[NSString stringWithFormat:@"%lld", current]];
			}
			basic[name] = valueString;
			[dfhgwhruebvhrheyoptionsaving saveDataString:[basic yy_modelToJSONString] withKey:dhgfywegwygeydwcharacteristicpredominant];
		}
			break;
		case 2: {
			dhgfywegwygeydwexistenceconquest *model;
			if (dataString.length == 0) {
				model = [[dhgfywegwygeydwexistenceconquest alloc] init];
			}else {
				model = [dhgfywegwygeydwexistenceconquest yy_modelWithJSON:dataString];
			}
			long long current = [[NSDate date] timeIntervalSince1970] * 1000;
			NSMutableDictionary *identity = [model yy_modelToJSONObject];
			NSString *valueString = [NSString stringWithFormat:@"%@", identity[name]];
			NSRange r = [valueString rangeOfString:@"_"];
			if (r.location == NSNotFound) {
				valueString = [NSString stringWithFormat:@"%lld_%d", current, 0];
			}else {
				valueString = [valueString stringByReplacingCharactersInRange:NSMakeRange(0, r.location) withString:[NSString stringWithFormat:@"%lld", current]];
			}
			identity[name] = valueString;
			[dfhgwhruebvhrheyoptionsaving saveDataString:[identity yy_modelToJSONString] withKey:dhgfywegwygeydwpredominantcrash];
		}
			break;
		case 3: {
			dhgfywegwygeydwconquestcharacteristic *model;
			if (dataString.length == 0) {
				model = [[dhgfywegwygeydwconquestcharacteristic alloc] init];
			}else {
				model = [dhgfywegwygeydwconquestcharacteristic yy_modelWithJSON:dataString];
			}
			long long current = [[NSDate date] timeIntervalSince1970] * 1000;
			NSMutableDictionary *option = [model yy_modelToJSONObject];
			NSString *valueString = [NSString stringWithFormat:@"%@", option[name]];
			NSRange r = [valueString rangeOfString:@"_"];
			if (r.location == NSNotFound) {
				valueString = [NSString stringWithFormat:@"%lld_%d", current, 0];
			}else {
				valueString = [valueString stringByReplacingCharactersInRange:NSMakeRange(0, r.location) withString:[NSString stringWithFormat:@"%lld", current]];
			}
			option[name] = valueString;
			[dfhgwhruebvhrheyoptionsaving saveDataString:[option yy_modelToJSONString] withKey:dhgfywegwygeydwcrashbarrier];
		}
			break;
		default:
			break;
	}
}
+ (void)duartion:(NSString *)name isCover:(BOOL)cover byType:(int)type {
	if (![dfhgwhruebvhrheyoptionsaving isLogin]) {
		return;
	}
	NSString *dataString = [self getTrackDataByType:type];
	switch (type) {
		case 1:{
			dhgfywegwygeydwsegmentexistence *model;
			if (dataString.length == 0) {
				model = [[dhgfywegwygeydwsegmentexistence alloc] init];
			}else {
				model = [dhgfywegwygeydwsegmentexistence yy_modelWithJSON:dataString];
			}
			NSMutableDictionary *basic = [model yy_modelToJSONObject];
			long long current = [[NSDate date] timeIntervalSince1970] * 1000;
			if (cover) {
				if ([basic[name] intValue] == -999) {
					return;
				}
				NSDecimalNumber *_start = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%@", basic[name]]];
				NSDecimalNumber *_current = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%lld", current]];;
				int duration = [[_current decimalNumberBySubtracting:_start] intValue];
				basic[name] = @(duration);
			}else {
				NSString *valueString = [NSString stringWithFormat:@"%@", basic[name]];
				if ([valueString containsString:@"_"]) {
					NSArray *seps = [valueString componentsSeparatedByString:@"_"];
					NSDecimalNumber *_start = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%@", seps[0]]];
					NSDecimalNumber *_current = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%lld", current]];;
					int duration = [[_current decimalNumberBySubtracting:_start] intValue];
					int lastDuration = [seps[1] intValue];
					int total = lastDuration + duration;
					basic[name] = [NSString stringWithFormat:@"total_%d",total];
				}
			}
			[dfhgwhruebvhrheyoptionsaving saveDataString:[basic yy_modelToJSONString] withKey:dhgfywegwygeydwcharacteristicpredominant];
		}
			break;
		case 2: {
			dhgfywegwygeydwexistenceconquest *model;
			if (dataString.length == 0) {
				model = [[dhgfywegwygeydwexistenceconquest alloc] init];
			}else {
				model = [dhgfywegwygeydwexistenceconquest yy_modelWithJSON:dataString];
			}
			NSMutableDictionary *identity = [model yy_modelToJSONObject];
			long long current = [[NSDate date] timeIntervalSince1970] * 1000;
			if (cover) {
				if ([identity[name] intValue] == -999) {
					return;
				}
				NSDecimalNumber *_start = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%@", identity[name]]];
				NSDecimalNumber *_current = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%lld", current]];;
				int duration = [[_current decimalNumberBySubtracting:_start] intValue];
				identity[name] = @(duration);
			}else {
				NSString *valueString = [NSString stringWithFormat:@"%@", identity[name]];
				if ([valueString containsString:@"_"]) {
					NSArray *seps = [valueString componentsSeparatedByString:@"_"];
					NSDecimalNumber *_start = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%@", seps[0]]];
					NSDecimalNumber *_current = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%lld", current]];;
					int duration = [[_current decimalNumberBySubtracting:_start] intValue];
					int lastDuration = [seps[1] intValue];
					int total = lastDuration + duration;
					identity[name] = [NSString stringWithFormat:@"total_%d",total];
				}else {
				}
			}
			[dfhgwhruebvhrheyoptionsaving saveDataString:[identity yy_modelToJSONString] withKey:dhgfywegwygeydwpredominantcrash];
		}
			break;
		case 3: {
			dhgfywegwygeydwconquestcharacteristic *model;
			if (dataString.length == 0) {
				model = [[dhgfywegwygeydwconquestcharacteristic alloc] init];
			}else {
				model = [dhgfywegwygeydwconquestcharacteristic yy_modelWithJSON:dataString];
			}
			NSMutableDictionary *option = [model yy_modelToJSONObject];
			long long current = [[NSDate date] timeIntervalSince1970] * 1000;
			if (cover) {
				if ([option[name] intValue] == -999) {
					return;
				}
				NSDecimalNumber *_start = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%@", option[name]]];
				NSDecimalNumber *_current = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%lld", current]];;
				int duration = [[_current decimalNumberBySubtracting:_start] intValue];
				option[name] = @(duration);
			}else {
				NSString *valueString = [NSString stringWithFormat:@"%@", option[name]];
				if ([valueString containsString:@"_"]) {
					NSArray *seps = [valueString componentsSeparatedByString:@"_"];
					NSDecimalNumber *_start = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%@", seps[0]]];
					NSDecimalNumber *_current = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%lld", current]];;
					int duration = [[_current decimalNumberBySubtracting:_start] intValue];
					int lastDuration = [seps[1] intValue];
					int total = lastDuration + duration;
					option[name] = [NSString stringWithFormat:@"total_%d",total];
				}
			}
			[dfhgwhruebvhrheyoptionsaving saveDataString:[option yy_modelToJSONString] withKey:dhgfywegwygeydwcrashbarrier];
		}
			break;
		default:
			break;
	}
}
+ (void)duationTotal:(NSString *)name withDuration1:(NSString *)name1 andDuration2:(NSString *)name2 {
	if (![dfhgwhruebvhrheyoptionsaving isLogin]) {
		return;
	}
	NSString *dataString = [dfhgwhruebvhrheyoptionsaving getDataStringByKey:dhgfywegwygeydwcharacteristicpredominant];
	dhgfywegwygeydwsegmentexistence *model;
	if (dataString.length == 0) {
		model = [[dhgfywegwygeydwsegmentexistence alloc] init];
	}else {
		model = [dhgfywegwygeydwsegmentexistence yy_modelWithJSON:dataString];
	}
	NSMutableDictionary *basic = [model yy_modelToJSONObject];
	int duration1 = [basic[name1] intValue];
	int duration2 = [basic[name2] intValue];
	basic[name] = @(duration1 + duration2);
	[dfhgwhruebvhrheyoptionsaving saveDataString:[basic yy_modelToJSONString] withKey:dhgfywegwygeydwcharacteristicpredominant];
}
+ (void)uploadRiskingData:(int)type {
	if (![dfhgwhruebvhrheyoptionsaving isLogin]) {
		return;
	}
	NSString *dataString = [self getTrackDataByType:type];
	dataString = [dataString stringByReplacingOccurrencesOfString:@"total_" withString:@""];
	NSLog(@"===== %@",dataString);
	NSMutableDictionary *params = [@{} mutableCopy];
	params[@"type"] = @(type);
	params[@"data"] = dataString;
	params[@"version_number"] = [dfhgwhruebvhrheyoptionsaving appVersionString];
	[[dfhgwhruebvhrheyluggagerecorder shareInstance] dhgfywegwygeydwbarrierawait:dhgfywegwygeydwawaitlamb path:loaderRiskingDataApi isEncrypt:YES withParams:params success:^(NSURLSessionDataTask * _Nonnull task, NSString * _Nonnull json) {
		dfhgwhruebvhrheysternideology *model = [dfhgwhruebvhrheysternideology yy_modelWithJSON:json];
		if (model.code == 200) {
			NSLog(@"loader success");
		}
	} failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) {
		NSLog(@"==== %@",error);
	}];
}
@end
